package com.gzhryc.net_marketing.cloud.goods.dao.db;

import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.PrimaryKey;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.net_marketing.core.enums.EGoodsState;

import java.util.Date;

/**
 * 商品的规格信息
 */
@Table(name = "cloud_goods_space_audit_item")
public class CloudGoodsSpaceAuditItem {

    @PrimaryKey
    @Column(name="apply_id",notNull = true,note="应用ID")
    protected Long applyId;

    @PrimaryKey
    @Column(notNull = true)
    protected Long id;

    @PrimaryKey
    @Column(name="goods_id",notNull = true,note="商品ID")
    protected Long goodsId;

    @Column
    protected String name;

    @Column(name="thumbnail_img",length = 128,note="缩略图")
    protected String thumbnailImg;

    @Column(name="stock_num",note="库存")
    protected Integer stockNum;

    @Column
    protected Integer state;

    @Column(name = "update_date", autoUpdateTime = true)
    protected Date updateDate;

    @Column(name = "create_date")
    protected Date createDate;

    public Long getApplyId() {
        return applyId;
    }

    public void setApplyId(Long applyId) {
        this.applyId = applyId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getThumbnailImg() {
        return thumbnailImg;
    }

    public void setThumbnailImg(String thumbnailImg) {
        this.thumbnailImg = thumbnailImg;
    }

    public Integer getStockNum() {
        return stockNum;
    }

    public void setStockNum(Integer stockNum) {
        this.stockNum = stockNum;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getStateName(){
        return EGoodsState.note(this.state);
    }
}
